package com.javabi.unix.parser.free;

public class Free {

	private long total;
	private long used;
	private long free;
	private long shared;
	private long buffers;
	private long cached;

	public long getTotal() {
		return total;
	}

	public long getUsed() {
		return used;
	}

	public long getFree() {
		return free;
	}

	public long getShared() {
		return shared;
	}

	public long getBuffers() {
		return buffers;
	}

	public long getCached() {
		return cached;
	}

	public void setTotal(long total) {
		this.total = total;
	}

	public void setUsed(long used) {
		this.used = used;
	}

	public void setFree(long free) {
		this.free = free;
	}

	public void setShared(long shared) {
		this.shared = shared;
	}

	public void setBuffers(long buffers) {
		this.buffers = buffers;
	}

	public void setCached(long cached) {
		this.cached = cached;
	}

	public long getActualUsed() {
		return getUsed() - getBuffers() - getCached();
	}

	public long getActualFree() {
		return getFree() + getBuffers() + getCached();
	}

	@Override
	public String toString() {
		return "Free[total=" + total + ", used=" + used + ", free=" + free + ", shared=" + shared + ", buffers=" + buffers + ", cached=" + cached + "]";
	}

}
